package com.kaifamiao.modern;

import java.time.LocalTime;

/**
 *  1s = 1000 ms (毫秒)
 * 1ms = 1000 μs (微秒)
 * 1μs = 1000 ns (纳秒，也称作 毫微秒)
 * 1ns = 1000 ps (皮秒)
 */
public class LocalTimeTest2 {

	public static void main(String[] args) {
		
		System.out.println( LocalTime.MIN); // 00:00
		System.out.println( LocalTime.MIDNIGHT);// 00:00
		System.out.println( LocalTime.NOON); // 12:00
		System.out.println( LocalTime.MAX); // 23:59:59.999999999
		
		System.out.println( "- - - ".repeat( 5 ) );
		
		LocalTime now = LocalTime.now();
		System.out.println( now );
		
		LocalTime time = LocalTime.of( 16 ,  30 );
		System.out.println( time );
		
		time = LocalTime.of( 15 , 10 , 30 );
		System.out.println( time );
		
		time = LocalTime.of( 7, 2, 18, 100200300 );
		System.out.println( time );
		
		// 从 00:00 开始经历 指定的纳秒数后对应的时间
		time = LocalTime.ofNanoOfDay( 100200300 * 1000L );
		System.out.println( time );
		
		// 从 00:00 开始经历 指定的秒数后对应的时间
		time = LocalTime.ofSecondOfDay( 60 * 60 * 13 );
		System.out.println( time );
		
	}

}
